package com.itcat.service.impl;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itcat.api.mysql.CmsSubjectApi;
import com.itcat.mysql.pojo.CmsSubject;
import com.itcat.mysql.pojo.SmsHomeAdvertise;
import com.itcat.mysql.vo.PageResult;
import com.itcat.service.CmsSubjectService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 小心触碰的电脑
* @description 针对表【cms_subject(专题表)】的数据库操作Service实现
* @createDate 2022-04-03 14:44:52
*/
@Service
public class CmsSubjectServiceImpl implements CmsSubjectService {

    @DubboReference
    private CmsSubjectApi cmsSubjectApi;

    /**
     * 获取全部商品专题
     * @return
     */
    @Override
    public List<CmsSubject> listAll() {
        List<CmsSubject> list = cmsSubjectApi.listAll();
        return list;
    }

    /**
     * 分页获取商品专题
     * @param keyword
     * @param pageNum
     * @param pageSize
     * @return
     */
    @Override
    public Page<CmsSubject> list(String keyword, Integer pageNum, Integer pageSize) {

        Page<CmsSubject> page = cmsSubjectApi.list(keyword,pageNum,pageSize);
        return page;
    }
}
